<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录</title>
<script type="text/javascript" src="./jquery.min.js">
</script>
</head>
<body>
	<form action="">
		账号：<input id="username" type="text" name="username">
		密码：<input  id="password" type="text" name="password">
		<input id="button1" type="button" value="注册">
	</form>
</body>
<script type="text/javascript">

$(document).on("click" ,"#button1",function(){
	var username=$('#username').val();
	var password=$('#password').val();
	 $.ajax({
         type:"post",
         url:"192.168.1.106/weixin/user/register.do",
         data:{"username":username,"password":password},
         async:true,
         success: function(res){
            alert(res);
         },
         error: function(){
           alert("请刷新重试")
         }
    });
})

</script>

</html>

